<?php

namespace Caisse\CaisseBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Tables
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Caisse\CaisseBundle\Entity\TablesRepository")
 */
class Tables
{
    //aaaaaaaaaaaaaaaaaaaaaaaa
    /**
     * @ORM\ManyToOne(targetEntity="Caisse\CaisseBundle\Entity\Serveur", inversedBy="tables")
   
     */
    private $serveur;
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;
    
           /**
     * @var integer
     *
     * @ORM\Column(name="etatTable", type="integer")
     */
    private $etatTable;
    
         /**
     * @ORM\OneToMany(targetEntity="Caisse\CaisseBundle\Entity\Commande", mappedBy="table")
     */
    private $commandes;

     
      
    /**
     * @var integer
     *
     * @ORM\Column(name="numTable", type="integer")
     */
    private $numTable;


    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set numTable
     *
     * @param integer $numTable
     * @return Tables
     */
    public function setNumTable($numTable)
    {
        $this->numTable = $numTable;
    
        return $this;
    }

    /**
     * Get numTable
     *
     * @return integer 
     */
    public function getNumTable()
    {
        return $this->numTable;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->commandes = new \Doctrine\Common\Collections\ArrayCollection();
        $this->etatTable = 0;
    }
    
    /**
     * Add commandes
     *
     * @param \Caisse\CaisseBundle\Entity\Commande $commandes
     * @return Tables
     */
    public function addCommande(\Caisse\CaisseBundle\Entity\Commande $commandes)
    {
        $this->commandes[] = $commandes;
    
        return $this;
    }

    /**
     * Remove commandes
     *
     * @param \Caisse\CaisseBundle\Entity\Commande $commandes
     */
    public function removeCommande(\Caisse\CaisseBundle\Entity\Commande $commandes)
    {
        $this->commandes->removeElement($commandes);
    }

    /**
     * Get commandes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getCommandes()
    {
        return $this->commandes;
    }

    /**
     * Set serveur
     *
     * @param \Caisse\CaisseBundle\Entity\Serveur $serveur
     * @return Tables
     */
    public function setServeur(\Caisse\CaisseBundle\Entity\Serveur $serveur = null)
    {
        $this->serveur = $serveur;
    
        return $this;
    }

    /**
     * Get serveur
     *
     * @return \Caisse\CaisseBundle\Entity\Serveur 
     */
    public function getServeur()
    {
        return $this->serveur;
    }




    /**
     * Set etatTable
     *
     * @param integer $etatTable
     * @return Tables
     */
    public function setEtatTable($etatTable)
    {
        $this->etatTable = $etatTable;
    
        return $this;
    }

    /**
     * Get etatTable
     *
     * @return integer 
     */
    public function getEtatTable()
    {
        return $this->etatTable;
    }

    /**
     * Add articlecommandes
     *
     * @param \Caisse\CaisseBundle\Entity\ArticleCommande $articlecommandes
     * @return Tables
     */
    public function addArticlecommande(\Caisse\CaisseBundle\Entity\ArticleCommande $articlecommandes)
    {
        $this->articlecommandes[] = $articlecommandes;
    
        return $this;
    }

    /**
     * Remove articlecommandes
     *
     * @param \Caisse\CaisseBundle\Entity\ArticleCommande $articlecommandes
     */
    public function removeArticlecommande(\Caisse\CaisseBundle\Entity\ArticleCommande $articlecommandes)
    {
        $this->articlecommandes->removeElement($articlecommandes);
    }

    /**
     * Get articlecommandes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getArticlecommandes()
    {
        return $this->articlecommandes;
    }

    /**
     * Get articlecommande
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getArticlecommande()
    {
        return $this->articlecommande;
    }

    /**
     * Add ligneCommande
     *
     * @param \Caisse\CaisseBundle\Entity\ArticleCommande $ligneCommande
     * @return Tables
     */
    public function addLigneCommande(\Caisse\CaisseBundle\Entity\ArticleCommande $ligneCommande)
    {
        $this->ligneCommande[] = $ligneCommande;
    
        return $this;
    }

    /**
     * Remove ligneCommande
     *
     * @param \Caisse\CaisseBundle\Entity\ArticleCommande $ligneCommande
     */
    public function removeLigneCommande(\Caisse\CaisseBundle\Entity\ArticleCommande $ligneCommande)
    {
        $this->ligneCommande->removeElement($ligneCommande);
    }

    /**
     * Get ligneCommande
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getLigneCommande()
    {
        return $this->ligneCommande;
    }

    /**
     * Get ligneCommandes
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getLigneCommandes()
    {
        return $this->ligneCommandes;
    }
}